<template>
	<view style="background-color: #F8F8F8; overflow-x: hidden;">
		<view class="nav-back">
			<top-heigth :backTitle="backTitle"></top-heigth>
		</view>
		
		<view class="kong-box" v-if="myList.length == 0 || myList.length == null">
			<uv-empty mode="" text="暂时还有用户对您进行评价~" icon="/static/image/kong-pingjia.png"></uv-empty>
		</view>
		<view class="content-box">
			<view class="notice2-list" v-for="item in myList">
				<view class="notice-list-l" v-if="item.tAppUserVo">
					<view class="evaluate-head-font">
						<view class="evaluate-head">
							<image :src="item.tAppUserVo.userCover || '/static/image/mine-head.png' " mode="widthFix"></image>
						</view>
						<span>{{item.tAppUserVo.userName}}</span>
					</view>
					<view class="font-hui">{{item.createTime}}</view>
				</view>
				<view class="evaluate-list">
					<view class="evaluate-list-l">服务评分</view>
					<uv-rate :value="item.score" readonly active-color="#FA3534" inactive-color="#b2b2b2"></uv-rate>
				</view>
				<view class="evaluate-list">
					<view class="evaluate-list-l">服务项目</view>
					<view class="evaluate-list-r">{{item.tAppServiceVo.serviceName}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TopHeigth from '@/components/TopHeigth.vue'
	
	export default {
		data() {
			return {
				backTitle:"用户评价",
				userInfo: uni.getStorageSync('userInfo'),
				myList:[],
				orderCode: null
			}
		},
		components: { TopHeigth },
		onLoad(e) {
			this.orderCode = e.orderCode
			this.getList()
		},
		methods: {
			getList() {
				uni.$u.http.post('/api/shop/v1_0/tAppUserCommentRCA/queryTAppUserComment',{
					staffId:this.userInfo.id,
					orderCode: this.orderCode
				}).then((res) => {
					this.myList = res.aaData
				}) 
			},
		}
	}
</script>

<style lang="scss" scoped>
	@mixin flex($direction: row) {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: $direction;
	}
	.uv-nav-slot {
		@include flex;
		align-items: center;
		justify-content: space-between;
		border-width: 0.5px;
		border-radius: 100px;
		border-color: #dadbde;
		padding: 3px 7px;
		opacity: 0.8;
	}
	
	.notice2-list{
		background-color: #fff;
		border-radius: 24rpx;
		padding: 32rpx 24rpx;
		margin-top: 24rpx;
		.notice-list-l{
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 30rpx;
			color: #333;
			margin-bottom: 30rpx;
		}
		.font{
			color: #666;
			font-size: 26rpx;
			margin-top: 16rpx;
			line-height: 44rpx;
		}
	}
	
	.evaluate-head-font{
		@include flex;
		align-items: center;
		justify-content: start;
		overflow: hidden;
		font-size: 26rpx;
	}
	.evaluate-head{
		width:76rpx;
		height: 76rpx;
		border-radius: 76rpx;
		@include flex;
		align-items: center;
		justify-content: center;
		overflow: hidden; 
		margin-right: 10rpx;
	}
	.evaluate-list{
		@include flex;
		align-items: center;
		justify-content: start;
		margin-bottom: 32rpx;
		.evaluate-list-l{
			font-size:26rpx;
			font-weight: bold;
			color: #333;
			margin-right: 20rpx;
		}
		.evaluate-list-r{
			font-size:26rpx;
			color: #666666;
		}
	}
</style>
